﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="SubmitOrder.aspx.cs" Inherits="Card.Web.Member.SubmitOrder" %>

<%@ Import Namespace="Card.Utility" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<%@ Register Src="Header.ascx" TagName="Header" TagPrefix="uc1" %>
<%@ Register Src="../Controls/Footer.ascx" TagName="Footer" TagPrefix="uc1" %>
<%@ Register Src="Menu.ascx" TagName="Menu" TagPrefix="uc1" %>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <title>填写订单信息_<%=SiteName %></title>
    <link href="../css/layout.css" type="text/css" rel="Stylesheet" />
    <link href="../css/member.css" type="text/css" rel="Stylesheet" />
    <link href="../css/login.css" type="text/css" rel="Stylesheet" />

    <script src="../JavaScript/jquery-1.8.3.min.js" type="text/javascript"></script>

    <script src="../JavaScript/math-operation.js" type="text/javascript"></script>

    <script src="../JavaScript/jquery-ui-1.9.2.custom.min.js" type="text/javascript"></script>

    <script src="../JavaScript/common.js" type="text/javascript"></script>

    <script src="../JavaScript/member.js" type="text/javascript"></script>

</head>
<body>
    <form id="form1" runat="server">
    <uc1:Header ID="Header1" runat="server"></uc1:Header>
    <div class="content">
        <uc1:Menu ID="Menu1" runat="server"></uc1:Menu>
        <div class="right">
            <div class="top_info clear-fix">
                <h2>
                    填写订单信息</h2>
            </div>
            <div runat="server" id="divOrder">
                <fieldset>
                    <legend>
                        <h4>
                            填写收货信息</h4>
                    </legend>
                    <table class="TB">
                        <tr class="TB_Header">
                            <td align="left">
                                收货地址
                            </td>
                        </tr>
                        <asp:Repeater ID="rptAddress" runat="server">
                            <ItemTemplate>
                                <tr class="TB_Item">
                                    <td>
                                        <input type="radio" name="rdbAddress" value='<%# Eval("ID") %>' />
                                        <%# string.Format("{0} {1} {2}(收) 电话:{3} 邮编:{4}", Eval("AREA"), Eval("STREET"), Eval("RECEIVER_NAME"), Eval("PHONE"), Eval("POST_CODE"))%></p>
                                    </td>
                                </tr>
                            </ItemTemplate>
                            <FooterTemplate>
                                <tr class="TB_Item">
                                    <td>
                                        <p>
                                            <a href="javascript:void(0);add_address();">使用新的收货地址</a></p>
                                    </td>
                                </tr>
                            </FooterTemplate>
                        </asp:Repeater>
                    </table>
                </fieldset>
                <fieldset>
                    <legend>
                        <h4>
                            支付和配送方式</h4>
                    </legend>
                    <asp:Repeater ID="rptPaymentMethod" runat="server">
                        <HeaderTemplate>
                            <table class="TB">
                                <tr class="TB_Header">
                                    <td align="left">
                                        付款方式
                                    </td>
                                </tr>
                        </HeaderTemplate>
                        <ItemTemplate>
                            <tr class="TB_Item">
                                <td>
                                    <input type="radio" name="rdbPayment" value='<%# Eval("LookupCode") %>' /><%# Eval("Value") %>
                                </td>
                            </tr>
                        </ItemTemplate>
                        <FooterTemplate>
                            </table>
                        </FooterTemplate>
                    </asp:Repeater>
                    <asp:Repeater ID="rptSippingDate" runat="server">
                        <HeaderTemplate>
                            <table class="TB">
                                <tr class="TB_Header">
                                    <td align="left">
                                        送货时间
                                    </td>
                                </tr>
                        </HeaderTemplate>
                        <ItemTemplate>
                            <tr class="TB_Item">
                                <td>
                                    <input type="radio" name="rdbSippingDate" value='<%# Eval("LookupCode") %>' /><%# Eval("Value") %>
                                </td>
                            </tr>
                        </ItemTemplate>
                        <FooterTemplate>
                            </table>
                        </FooterTemplate>
                    </asp:Repeater>
                </fieldset>
                <fieldset>
                    <legend>
                        <h4>
                            订单备注</h4>
                    </legend>
                    <asp:TextBox ID="txtRemark" runat="server" TextMode="MultiLine" Width="100%" Rows="3"></asp:TextBox>
                </fieldset>
                <fieldset>
                    <legend>
                        <h4>
                            订单配送信息</h4>
                    </legend>
                    <asp:Repeater ID="rptList" runat="server">
                        <HeaderTemplate>
                            <table class="TB">
                                <tr class="TB_Header">
                                    <td>
                                        编号
                                    </td>
                                    <td>
                                        名片
                                    </td>
                                    <td>
                                        名片简述
                                    </td>
                                    <td>
                                        价格(元)
                                    </td>
                                    <td>
                                        数量
                                    </td>
                                    <td>
                                        小计(元)
                                    </td>
                                </tr>
                        </HeaderTemplate>
                        <ItemTemplate>
                            <tr class="TB_Item">
                                <td align="center">
                                    <%# Eval("ID") %>
                                </td>
                                <td align="center">
                                    <img height="60" src='<%# ImageUtilty.GetOrderCardListImagePath(int.Parse(Eval("ORDER_CARD_ID").ToString()),int.Parse(Eval("USER_ID").ToString()),Eval("FRONT_IMAGE").ToString()) %>' />
                                </td>
                                <td>
                                    <a style="line-height: 30px; text-decoration: none; font-size: 14px;" href="OrderCard.aspx">
                                        <%# Eval("ORDER_CARD_NAME")%></a>
                                    <p style="color: #999; line-height: 20px;">
                                        <%# Eval("CARD_SETTING_NAME")%>|<%# Eval("BOX_NUM")%>盒|<%# Eval("CORNER_NAME")%>|<%# bool.Parse(Eval("IS_ADJUST").ToString())?"有微调":"无微调"%></p>
                                </td>
                                <td align="center">
                                    <%# Eval("TOTAL_MONEY")%>
                                </td>
                                <td align="center">
                                    1
                                </td>
                                <td align="center">
                                    <%# Eval("TOTAL_MONEY")%>
                                </td>
                            </tr>
                        </ItemTemplate>
                        <FooterTemplate>
                            <tr class="TB_Bottom">
                                <td colspan="6" valign="middle" style="height: 37px;">
                                    <span style="line-height: 37px;">商品总价：<asp:Literal ID="ltlTotalMoney" Text="0" runat="server"></asp:Literal>元</span>
                                    <%-- <a href="confirmOrder.aspx" style="float: right">
                                        <img src="/images/Ck-f-040.gif" border="0" id="shopCart1_imgBalance" alt="结算"></a>--%>
                                </td>
                            </tr>
                            </table>
                        </FooterTemplate>
                    </asp:Repeater>
                </fieldset>
                <div style="text-align: right; margin-top: 10px;">
                    <p>
                        <a href="Cart.aspx" style="font-size: 15px; padding-right: 10px; color: #999; font-weight: bold;">
                            返回购物车</a>
                        <asp:Button ID="btnSubmit" class="button" OnClientClick="javascript:return submit_order();"
                            runat="server" Text="立即下单" />
                    </p>
                </div>
            </div>
            <div runat="server" visible="false" id="divEmpty">
                <table class="TB">
                    <tr class="TB_Bottom">
                        <td>
                            <span style="line-height: 37px;">你的购物车还是空的，赶快去设计名片下单吧:-D，<a style="font-size: 20px;
                                font-weight: bold; font-style: italic; color: Red;" href="/">GO!</a></span>
                        </td>
                    </tr>
                </table>
            </div>
        </div>
    </div>
    <asp:HiddenField ID="hndAddress" runat="server" />
    <asp:HiddenField ID="hndPayment" runat="server" />
    <asp:HiddenField ID="hndSippingDate" runat="server" />
    <uc1:Footer ID="Footer1" runat="server" />
    <div id="input-address-div" style="display: none">
        <div class="inputarea" id="new-address" style="background-color: #ffffff; padding: 20px;">
            <p>
                <span class="text">收货人姓名：</span><asp:TextBox ID="txtReceiver" CssClass="input" MaxLength="20"
                    runat="server"></asp:TextBox>
                <span class="red_notice" style="line-height: 30px;">*</span>
            </p>
            <p>
                <span class="text">省市区/县：</span><asp:TextBox ID="txtArea" CssClass="input" Width="400px"
                    MaxLength="20" runat="server"></asp:TextBox>
                <span class="red_notice" style="line-height: 30px;">*</span>
            </p>
            <p>
                <span class="text">乡镇/街道：</span><asp:TextBox ID="txtStreet" CssClass="input" Width="400px"
                    MaxLength="20" runat="server"></asp:TextBox>
                <span class="red_notice" style="line-height: 30px;">*</span>
            </p>
            <p>
                <span class="text">邮政编码：</span><asp:TextBox ID="txtPostCode" CssClass="input" MaxLength="20"
                    runat="server"></asp:TextBox>
                <span class="red_notice" style="line-height: 30px;">*</span>
            </p>
            <p>
                <span class="text">联系电话：</span><asp:TextBox ID="txtTel" CssClass="input" MaxLength="20"
                    runat="server"></asp:TextBox>
                <span class="red_notice" style="line-height: 30px;">*</span>
            </p>
            <p>
                <span class="text">&nbsp;</span>
                <asp:Button ID="btnSave" runat="server" OnClientClick="javascript:return check_address_submit();"
                    CssClass="button" Text="保存" />
                <input type="button" class="button" value="取消" onclick="close_shade('input-address-div')" />
            </p>
        </div>
    </div>

    <script type="text/javascript">
        init_order_radio()
    </script>

    </form>
</body>
</html>
